﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Mvc4Demo.Areas.Admin.Models;

namespace Mvc4Demo.Areas.Admin.Controllers
{
    //[Authorize]
    public class PdfTemplateController : Controller
    {
        public ActionResult Index()
        {
            var model = new List<PdfTemplateViewModel>();
            return View(model);
        }

        [HttpGet]
        public ActionResult Edit(int id)
        {
            var model = new PdfTemplateDetailsViewModel();
            return View(model);
        }

        [ValidateInput(false)]
        [HttpPost]
        public ActionResult Edit(PdfTemplateDetailsViewModel model)
        {
            if (ModelState.IsValid)
            {
                return RedirectToAction("Index");
            }
            return View(model);
        }
    }
}
